package org.example.fegin;

import entity.Article;
import org.example.fegin.fallback.ArticleFeginFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import vo.ArticleVo;

/**
 * @author : xuzhennan
 * @Project : 787k-cloud
 * @Package : org.example.fegin
 * @email : xuzhennan@58.com
 * @date : 2021年08月29日 下午2:16
 */
// 配置fallback兜底数据服务
@FeignClient(value = "787k-cloud-search",fallback = ArticleFeginFallbackService.class)
public interface ArticleFeginService {

    @GetMapping("/article/findArticlesWithPage")
    ArticleVo findArticles(@RequestParam("pageNumber") int pageNumber,@RequestParam("pageSize") int pageSize);

    @GetMapping("/article/articleDetail")
    Article getArticleDetail(@RequestParam("id") int id);
}
